<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" enctype="multipart/form-data" method="post">
                    <div class="widget-body">
                        <fieldset>
							<div class="widget-head am-cf">
                                <div class="widget-title am-fl">快速注册微信小程序</div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">营业执照 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <div class="am-form-file">
                                        <button type="button" class="license-copy am-btn am-btn-secondary am-radius am-btn-sm" >
                                            <i class="am-icon-cloud-upload"></i> 选择图片
                                        </button>
                                        <div class="uploader-list am-cf">
                                            {if !empty($model['details']['license_copy']['url'])}
                                                <div class="file-item">
                                                    <a href="{$model['details']['license_copy']['url']}" title="点击查看大图" target="_blank">
                                                        <img src="{$model['details']['license_copy']['url']}">
                                                    </a>
                                                    <input type="hidden" name="data[details][license_copy]"
                                                           value="{$model['details']['license_copy']['value']}">
                                                    <i class="iconfont iconshanchu file-item-delete"></i>
                                                </div>
                                            {/if}
                                        </div>
                                    </div>
                                    <div class="help-block am-margin-top-sm">
                                        <small>大小2M以下</small>
                                    </div>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">名称 </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" 
                                    name="data[details][merchant_name]" value="{$model['details']['merchant_name']}" required>
                                    <small>营业执照上面的名称</small>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">统一社会信用代码 </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" 
                                    name="data[details][license_number]" value="{$model['details']['license_number']}" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">身份证（正面） </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <div class="am-form-file">
                                        <button type="button" class="id-card-copy am-btn am-btn-secondary am-radius am-btn-sm" >
                                            <i class="am-icon-cloud-upload"></i> 选择图片
                                        </button>
                                        <div class="uploader-list am-cf">
                                            {if !empty($model['details']['id_card_copy']['url'])}
                                                <div class="file-item">
                                                    <a href="{$model['details']['id_card_copy']['url']}" title="点击查看大图" target="_blank">
                                                        <img src="{$model['details']['id_card_copy']['url']}">
                                                    </a>
                                                    <input type="hidden" name="data[details][id_card_copy]"
                                                           value="{$model['details']['id_card_copy']['value']}">
                                                    <i class="iconfont iconshanchu file-item-delete"></i>
                                                </div>
                                            {/if}
                                        </div>
                                    </div>
                                    <div class="help-block am-margin-top-sm">
                                        <small>身份证所有人必须跟营业执照法人（所有人）姓名一致。大小2M以下</small>
                                    </div>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">身份证（反面） </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <div class="am-form-file">
                                        <button type="button" class="id-card-national am-btn am-btn-secondary am-radius am-btn-sm" >
                                            <i class="am-icon-cloud-upload"></i> 选择图片
                                        </button>
                                        <div class="uploader-list am-cf">
                                            {if !empty($model['details']['id_card_national']['url'])}
                                                <div class="file-item">
                                                    <a href="{$model['details']['id_card_national']['url']}" title="点击查看大图" target="_blank">
                                                        <img src="{$model['details']['id_card_national']['url']}">
                                                    </a>
                                                    <input type="hidden" name="data[details][id_card_national]"
                                                           value="{$model['details']['id_card_national']['value']}">
                                                    <i class="iconfont iconshanchu file-item-delete"></i>
                                                </div>
                                            {/if}
                                        </div>
                                    </div>
                                    <div class="help-block am-margin-top-sm">
                                        <small>身份证所有人必须跟营业执照法人（所有人）姓名一致。大小2M以下</small>
                                    </div>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require"> 证件姓名 </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" 
                                    name="data[details][id_card_name]" value="{$model['details']['id_card_name']}" required>
                                    <small>身份证上面的姓名</small>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require"> 证件号码 </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" 
                                    name="data[details][id_card_number]" value="{$model['details']['id_card_number']}" required>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require"> 手机号 </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" 
                                    name="data[details][mobile_phone]" value="{$model['details']['mobile_phone']}" required>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require"> 微信号 </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" 
                                    name="data[details][legal_persona_wechat]" value="{$model['details']['legal_persona_wechat']}" required>
                                    <small>不是绑定的手机号！请打开微信->我的->点击头像->查看微信号<br>
                                    微信必须实名认证，并与上面身份证姓名一致。</small>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                    <button type="submit" class="j-submit am-btn am-btn-secondary">提交</button>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!-- 图片文件列表模板 -->
{include file="../addons/upload/view/template/tpl_file_item_url.html" /}
<!-- 文件库弹窗 -->
{include file="../addons/upload/view/template/file_library.html" /}

<script>
    $(function () {
        
        // 选择图片 - 身份证正面
        $('.license-copy').selectImages({
            name: 'data[details][license_copy]'
        });
        // 选择图片 - 身份证正面
        $('.id-card-copy').selectImages({
            name: 'data[details][id_card_copy]'
        });
        // 选择图片 - 身份证反面
        $('.id-card-national').selectImages({
            name: 'data[details][id_card_national]'
        });
        $('#my-form').formPost();

    });
</script>
